
#ifndef     __LV_USER_SQLIST_H__
#define     __LV_USER_SQLIST_H__

typedef uint8_t ElemType_t;
typedef struct
{
    ElemType_t *data;
    uint8_t length;
}SqlistType_t;

//0:success,>=1:fail
typedef uint8_t StatusType;

//最大支持的长度
#define     SQLIST_MAX_LENGTH       15
//状态
#define     SUCCESS                 0
#define     OVERFLOW                1       //上下标溢出
//--------------------------------------------------------
StatusType lv_user_list_delete(SqlistType_t *list,uint8_t index);
StatusType lv_user_list_insert(SqlistType_t *list,uint8_t index,ElemType_t e);
StatusType lv_user_list_replace(SqlistType_t *list,uint8_t index,ElemType_t e);
uint8_t lv_user_list_get_elem_id(SqlistType_t *list,ElemType_t e);
ElemType_t lv_user_list_get_prev_elem(SqlistType_t *list,uint8_t index);
ElemType_t lv_user_list_get_next_elem(SqlistType_t *list,uint8_t index);
ElemType_t lv_user_list_get_cur_elem(SqlistType_t *list,uint8_t index);
uint8_t lv_user_list_get_sqlist_length(SqlistType_t *list);
void ListTraverse(SqlistType_t *list);
#endif
